#include <algorithm/shared/data/scene/Heliostat.h>

#include <atomic>
#include <iostream>

using namespace solar;

std::atomic_int Heliostat::heliostat_cnt_ = 0; // 类的静态成员变量需要在类外分配空间

#include <utils/class_describe_source.inc>

Heliostat::Heliostat(Heliostat&& another) noexcept
    : id_(another.id_), material_(std::move(another.material_)),
      geometry_(std::move(another.geometry_)), subhelio_row_col_(another.subhelio_row_col_),
      gap_(another.subhelio_row_col_), thickness_(another.thickness_),
      has_brace_(another.has_brace_), mechanical_para_(std::move(another.mechanical_para_))
{
}

auto Heliostat::operator=(Heliostat&& another)  noexcept -> Heliostat&
{
    this->id_ = another.id_;
    this->material_ = std::move(another.material_);
    this->geometry_ = std::move(another.geometry_);
    this->subhelio_row_col_ = another.subhelio_row_col_;
    this->gap_ = another.gap_;
    this->thickness_ = another.thickness_;
    this->has_brace_ = another.has_brace_;
    this->mechanical_para_ = std::move(another.mechanical_para_);
    return *this;
}
